<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="__CSS__/base.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/commend.css?11">
    <script src="__JS__/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="__JS__/reset.js"></script>
    <title>下级推荐</title>
</head>
<body>
    <div class="wrap">
        <div class="header">
          <i class="iconfont icon" id="toMy">&#xe60e;</i>
          <div class="header_title">下级推荐</div>
        </div>
        <div class="main">
            <div class="content">
              <img class="userhead" src="{$userInfo.head_img_url}" alt="">
              <p class="username">{$userInfo.nickname}</p>
              <div class="qrcode_wrap">
                <img class="qrcode" src="" alt="">
              </div>
              <div class="cams">长按保存图片</div>
              <div class="down">
                <div class="btn_down" onclick="show()">生成下级推荐二维码</div>
              </div>
              <div class="ms">下级奖励说明</div>
              <p class="subms">一级奖励20%，二级10%，三级5%</p>
            </div>
        </div>
    </div>
    <div class="layer" style="display:none">
        <div class="layer_con">
           <span class="close">&times;</span>
           <div class="title">生成下级推荐码后,您将不能分享海报。</div>
           <div class="btn_group">
              <a href="#" class="cancel">取消</a>
              <a onclick="showQrcode();" class="sure">确定</a>
           </div>
        </div>
      </div>
    <script>
      function show(){
        $('.layer').show();
      }
      $('.cancel').click(function(){
        $('.layer').hide();
      })
      function showQrcode(){
        $.post('',null,function(data){
          let d = JSON.parse(data);
          $('.qrcode_wrap .qrcode').attr('src',d.url);
          $('.layer').hide();
        })
      }
    </script>
</body>
</html>